package study;

import java.util.Scanner;

public class P0CharacterDemo {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s;
        int digit=0,upper=0,lower=0,speace=0,other=0;
        //s = in.next();//不包括空格
        s = in.nextLine();//包括空格
        char[] ch=s.toCharArray();
        for (char a : ch) {
            if(Character.isDigit(a))++digit;
            else if (Character.isUpperCase(a))++upper;
            else if (Character.isLowerCase(a))++lower;
            else if (Character.isSpace(a))++speace;

            else ++other;
        }
        in.close();
        System.out.println("数字数目："+digit+"\n大写字母数："+upper+"\n小写字母数："+lower+"\n空格数："+speace+"\n其它字母："+other);
    }
}
